﻿#
systemctl daemon-reload

$private:docker启动状态 = systemctl status docker | Select-String 'active (running)' -SimpleMatch
if ( ($private:docker启动状态 -eq $null) -or ($private:docker启动状态 -eq '') )
{

}
else
{
	return $true
}

$private:docker停止状态 = systemctl status docker | Select-String 'inactive (dead)' -SimpleMatch
if ( ($private:docker停止状态 -eq $null) -or ($private:docker停止状态 -eq '') )
{

}
else
{
	return $false
}

Write-Error '错误：dockerd状态未知。错误码1'
exit 1
